﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace TXTD.Admin.Data.Migrations
{
    public partial class _202207311 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "SYS_USER_REFRESH_TOKEN",
                columns: table => new
                {
                    USER_REFRESH_TOKEN_ID = table.Column<string>(type: "nvarchar(32)", maxLength: 32, nullable: false),
                    USER_ID = table.Column<string>(type: "nvarchar(32)", maxLength: 32, nullable: false),
                    REFRESH_TOKEN = table.Column<string>(type: "nvarchar(max)", maxLength: 8000, nullable: false),
                    IS_USED = table.Column<bool>(type: "bit", nullable: false),
                    CREATED_BY = table.Column<string>(type: "nvarchar(32)", maxLength: 32, nullable: false),
                    CREATED_TIME = table.Column<DateTime>(type: "datetime2", nullable: false),
                    UPDATED_BY = table.Column<string>(type: "nvarchar(32)", maxLength: 32, nullable: true),
                    UPDATED_TIME = table.Column<DateTime>(type: "datetime2", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_SYS_USER_REFRESH_TOKEN", x => x.USER_REFRESH_TOKEN_ID);
                });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "SYS_USER_REFRESH_TOKEN");
        }
    }
}
